package solution

func V1(nums []int, val int) int {
	m := 0

	for i := 0; i < len(nums); i++ {
		if nums[i] != val {
			nums[m] = nums[i]
			m++
		}
	}

	return m
}
